/**
 * 
 */
package cc.rico.utils;

/**
 * 加密工具类
 * @author JiWo 2016年6月22日
 *
 */
public class CustomEncryptionUtils {

	private static final String DEFALUT_HASH_ALGORITHM = "";
	private static final int DEFAULT_HASH_ITERATIONS = 1;
	private static final boolean DEFAULT_HASH_SALTED = true;
	private static final boolean DEFAULT_STORED_CREDENTIALS_HEX_ENCODED = true;

	private String hashAlgorithm = DEFALUT_HASH_ALGORITHM;
	private int hashIterations = DEFAULT_HASH_ITERATIONS;
	private boolean hashSalted = DEFAULT_HASH_SALTED;
	private boolean storedCredentialsHexEncoded = DEFAULT_STORED_CREDENTIALS_HEX_ENCODED;

	public CustomEncryptionUtils() {
		
	}
	
	public CustomEncryptionUtils(String hashAlgorithm, int hashIterations, boolean hashSalted, boolean storedCredentialsHexEncoded) {
		this.hashAlgorithm = hashAlgorithm;
		this.hashIterations = hashIterations;
		this.hashSalted = hashSalted;
		this.storedCredentialsHexEncoded = storedCredentialsHexEncoded;
	}

	public String getHashAlgorithm() {
		return hashAlgorithm;
	}

	public void setHashAlgorithm(String hashAlgorithm) {
		this.hashAlgorithm = hashAlgorithm;
	}

	public int getHashIterations() {
		return hashIterations;
	}

	public void setHashIterations(int hashIterations) {
		this.hashIterations = hashIterations;
	}

	public boolean isHashSalted() {
		return hashSalted;
	}

	public void setHashSalted(boolean hashSalted) {
		this.hashSalted = hashSalted;
	}

	public boolean isStoredCredentialsHexEncoded() {
		return storedCredentialsHexEncoded;
	}

	public void setStoredCredentialsHexEncoded(
			boolean storedCredentialsHexEncoded) {
		this.storedCredentialsHexEncoded = storedCredentialsHexEncoded;
	}

}
